package com.itheima.controller;

import com.itheima.domain.db.UserInfo;
import com.itheima.domain.mongo.UserLocation;

import com.itheima.manager.UserManager;
import com.itheima.service.mongo.UserLocationService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {

    @Autowired
    UserManager userManager;


    @GetMapping("/soul/user/findUserAll")
    public ResponseEntity findUserAll(@RequestParam(defaultValue = "1")Integer pageNum,
                                      @RequestParam(defaultValue = "10")Integer pageSize,
                                      String title){

        return userManager.findUserAll(pageNum,pageSize,title);

    }

    @GetMapping("/soul/user/findSite")
    public ResponseEntity findSite(Long id){
       return userManager.findSite(id);
    }



}
